package com.gu.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.gu.entity.NoticeDO;
import java.util.List;
import com.gu.mapper.NoticeMapper;

/**
* The Table gu_notice.
* 通知公告表
*/
@Repository
public class NoticeDAO{

    @Autowired
    private NoticeMapper noticeMapper;

    /**
     * desc:插入表:gu_notice.<br/>
     * @param entity entity
     * @return Integer
     */
    public Integer insert(NoticeDO entity){
        return noticeMapper.insert(entity);
    }
    /**
     * desc:批量插入表:gu_notice.<br/>
     * @param list list
     * @return Integer
     */
    public Integer insertBatch(List<NoticeDO> list){
        return noticeMapper.insertBatch(list);
    }
    /**
     * desc:根据主键删除数据:gu_notice.<br/>
     * @param id id
     * @return Integer
     */
    public Integer deleteById(Integer id){
        return noticeMapper.deleteById(id);
    }

    public Integer deleteByIds(Integer[] ids){
        return noticeMapper.deleteByIds(ids);
    }

    /**
     * desc:根据主键获取数据:gu_notice.<br/>
     * @param id id
     * @return NoticeDO
     */
    public NoticeDO getById(Integer id){
        return noticeMapper.getById(id);
    }

    public List<NoticeDO> getNoticeBySearchParam(String searchParam, String searchDate) {
        return noticeMapper.getNoticeBySearchParam(searchParam, searchDate);
    }
}
